/// day : "2023-10-25"
/// questionList : [{"createTime":"2023-10-25 18:39:54","id":45,"cbmOutsidePatientId":15,"cbmOutsideUserPhone":"13223443123","cbmOutsideQuestionsId":4,"answer":"0,0,1,0","cbmOutsideQuestion":{"type":"3","question":"与叶酸同时服用的药物情况","option1":"维生素B6","option2":"维生素B12","option3":"甲钴胺","option4":"无","option5":""}}]

class InquiryRecordEntity {
  InquiryRecordEntity({
      this.day, 
      this.questionList,});

  InquiryRecordEntity.fromJson(dynamic json) {
    day = json['day'];
    if (json['questionList'] != null) {
      questionList = [];
      json['questionList'].forEach((v) {
        questionList?.add(QuestionList.fromJson(v));
      });
    }
  }
  String? day;
  List<QuestionList>? questionList;
InquiryRecordEntity copyWith({  String? day,
  List<QuestionList>? questionList,
}) => InquiryRecordEntity(  day: day ?? this.day,
  questionList: questionList ?? this.questionList,
);
  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['day'] = day;
    if (questionList != null) {
      map['questionList'] = questionList?.map((v) => v.toJson()).toList();
    }
    return map;
  }

}

/// createTime : "2023-10-25 18:39:54"
/// id : 45
/// cbmOutsidePatientId : 15
/// cbmOutsideUserPhone : "13223443123"
/// cbmOutsideQuestionsId : 4
/// answer : "0,0,1,0"
/// cbmOutsideQuestion : {"type":"3","question":"与叶酸同时服用的药物情况","option1":"维生素B6","option2":"维生素B12","option3":"甲钴胺","option4":"无","option5":""}

class QuestionList {
  QuestionList({
      this.createTime, 
      this.id, 
      this.cbmOutsidePatientId, 
      this.cbmOutsideUserPhone, 
      this.cbmOutsideQuestionsId, 
      this.answer, 
      this.cbmOutsideQuestion,});

  QuestionList.fromJson(dynamic json) {
    createTime = json['createTime'];
    id = json['id'];
    cbmOutsidePatientId = json['cbmOutsidePatientId'];
    cbmOutsideUserPhone = json['cbmOutsideUserPhone'];
    cbmOutsideQuestionsId = json['cbmOutsideQuestionsId'];
    answer = json['answer'];
    cbmOutsideQuestion = json['cbmOutsideQuestion'] != null ? CbmOutsideQuestion.fromJson(json['cbmOutsideQuestion']) : null;
  }
  String? createTime;
  num? id;
  num? cbmOutsidePatientId;
  String? cbmOutsideUserPhone;
  num? cbmOutsideQuestionsId;
  String? answer;
  CbmOutsideQuestion? cbmOutsideQuestion;
QuestionList copyWith({  String? createTime,
  num? id,
  num? cbmOutsidePatientId,
  String? cbmOutsideUserPhone,
  num? cbmOutsideQuestionsId,
  String? answer,
  CbmOutsideQuestion? cbmOutsideQuestion,
}) => QuestionList(  createTime: createTime ?? this.createTime,
  id: id ?? this.id,
  cbmOutsidePatientId: cbmOutsidePatientId ?? this.cbmOutsidePatientId,
  cbmOutsideUserPhone: cbmOutsideUserPhone ?? this.cbmOutsideUserPhone,
  cbmOutsideQuestionsId: cbmOutsideQuestionsId ?? this.cbmOutsideQuestionsId,
  answer: answer ?? this.answer,
  cbmOutsideQuestion: cbmOutsideQuestion ?? this.cbmOutsideQuestion,
);
  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['createTime'] = createTime;
    map['id'] = id;
    map['cbmOutsidePatientId'] = cbmOutsidePatientId;
    map['cbmOutsideUserPhone'] = cbmOutsideUserPhone;
    map['cbmOutsideQuestionsId'] = cbmOutsideQuestionsId;
    map['answer'] = answer;
    if (cbmOutsideQuestion != null) {
      map['cbmOutsideQuestion'] = cbmOutsideQuestion?.toJson();
    }
    return map;
  }

}

/// type : "3"
/// question : "与叶酸同时服用的药物情况"
/// option1 : "维生素B6"
/// option2 : "维生素B12"
/// option3 : "甲钴胺"
/// option4 : "无"
/// option5 : ""

class CbmOutsideQuestion {
  CbmOutsideQuestion({
      this.type,
      this.question,
      this.option1,
      this.option2,
      this.option3,
      this.option4,
      this.option5,});

  CbmOutsideQuestion.fromJson(dynamic json) {
    type = json['type'];
    question = json['question'];
    option1 = json['option1'];
    option2 = json['option2'];
    option3 = json['option3'];
    option4 = json['option4'];
    option5 = json['option5'];
  }
  String? type;
  String? question;
  String? option1;
  String? option2;
  String? option3;
  String? option4;
  String? option5;
CbmOutsideQuestion copyWith({  String? type,
  String? question,
  String? option1,
  String? option2,
  String? option3,
  String? option4,
  String? option5,
}) => CbmOutsideQuestion(  type: type ?? this.type,
  question: question ?? this.question,
  option1: option1 ?? this.option1,
  option2: option2 ?? this.option2,
  option3: option3 ?? this.option3,
  option4: option4 ?? this.option4,
  option5: option5 ?? this.option5,
);
  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['type'] = type;
    map['question'] = question;
    map['option1'] = option1;
    map['option2'] = option2;
    map['option3'] = option3;
    map['option4'] = option4;
    map['option5'] = option5;
    return map;
  }

}